{% extends "base.html" %}

{% block title %}{{ title }}{% endblock %}

{% block content %}
    <form action="/search/" method="get" class="form-search">
        <input type="text" name="q" value="{{ search_item }}">
        <input type="submit" class="btn" value="搜索">
    </form>
    {% if books %}
        <p>找到 {{ books|length }} 本书:</p>
        <ul>
            {% for book in books %}
            <li>{{ book }}</li>
            {% endfor %}
        </ul>
    {% else %}
        <p>未找到相应内容</p>
    {% endif %}
{% endblock %}
